import request from '@/utils/request'

// 查询服务项目列表
export function serviceLinkLs(params) {
    return request({
        url: '/client/service/item/link/list',
        method: 'get',
        params
    })
}
// 查询负责人下拉框列表
export function personList(params) {
    return request({
        url: '/client/service/item/link/person/list',
        method: 'get',
        params
    })
}
// 查询负责人下拉框列表(无需传参)
export function personListV2(params) {
    return request({
        url: '/client/service/item/link/person/list/V2',
        method: 'get',
        params
    })
}
// 新增服务流程
export function addServiceLink(data) {
    return request({
        url: '/client/service/item/link',
        method: 'post',
        data
    })
}
// 修改服务流程
export function editServiceLink(data) {
    return request({
        url: '/client/service/item/link',
        method: 'put',
        data
    })
}
// 服务项目详情
export function serviceLinkDetail(id) {
    return request({
        url: `/client/service/item/link/${id}`,
        method: 'get'
    })
}
// 服务列表
export function serviceRecordls(params) {
    return request({
        url: '/client/service/item/record/v1/list',
        method: 'get',
        params
    })
}
// 客户负责人下拉
export function responsibleSelect() {
    return request({
      url: '/responsible/person/responsibleSelect',
      method: 'get'
    })
}
// 确认新增服务单
export function addServiceRecord(data) {
    return request({
        url: '/client/service/item/record/v1/add',
        method: 'post',
        data
    })
}
// 获取 服务客户 下拉
export function servingCustomers(params) {
    return request({
        url: '/client/service/item/record/v1/clientListV2',
        method: 'get',
        params
    })
}
// 服务项目 下拉
export function serviceItemsLs(id) {
    return request({
        url: `/client/service/item/record/v1/serviceItemSelectListV2`,
        method: 'get'
    })
}
// 客户服务项目环节 列表
export function listByServiceItemIdAndClientId(params) {
    return request({
        url: '/client/service/item/record/v1/listByServiceItemIdAndClientId',
        method: 'get',
        params
    })
}
// 查看服务单
export function serviceRecordDetail(id) {
    return request({
        url: `/client/service/item/record/v1/detail/${id}`,
        method: 'get'
    })
}
// 服务确认提交
export function serviceItemsConfirm(data) {
    return request({
        url: '/client/service/item/record/v1/confirm',
        method: 'put',
        data
    })
}
// 查看客户服务环节记录
export function serviceItemsLinkDetail(id) {
    return request({
        url: `/client/service/item/record/v1/link/detail/${id}`,
        method: 'get'
    })
}
// 服务驳回
export function serviceItemsRefuse(data) {
    return request({
        url: '/client/service/item/record/v1/refuse',
        method: 'put',
        data
    })
}
// 获取 服务待办列表
export function serviceToDoLs(params) {
    return request({
        url: '/client/service/item/link/record/v1/list',
        method: 'get',
        params
    })
}
//获取直播班次下拉
export function getClientLiveWorkforceSelect(params) {
    return request({
        url: '/client/service/item/record/v1/getClientLiveWorkforceSelect',
        method: 'get',
        params
    })
}
// 获取 直播数据汇总列表
export function statisticsList(params) {
    return request({
        url: '/client/service/live/statistics/list',
        method: 'get',
        params
    })
}
// 中台 移交处理人
export function recordTransfer(data) {
    return request({
        url: '/client/service/item/record/v1/transfer',
        method: 'put',
        data
    })
}
// 获取客户服务环节直播数据
export function liveDetail(id) {
    return request({
        url: `/client/service/item/record/v1/liveDetail/${id}`,
        method: 'get'
    })
}
// 中台 客户服务环节直播数据
export function recordUpdateLive(data) {
    return request({
        url: '/client/service/item/record/v1/updateLive',
        method: 'put',
        data
    })
}
